/*
 * XYZTNeighborhood.java
 *
 * Created on September 17, 2004, 1:25 PM
 */

package edu.temple.GUS.MMA.Neighborhoods;

/**
 *
 * @author  jeffleon
 */
public class XYZTNeighborhood extends MMANeighborhood{
    
    protected int x;
    protected int y;
    protected int t;
    protected int z;
    
    /** Creates a new instance of XYZTNeighborhood */
    public XYZTNeighborhood(int x, int y, int z, int t) {
        this.x = x;
        this.y = y;
        this.t = t;
        this.z = z;
    }
    
    public int getX () { return x; }
    public int getY () { return y; }
    public int getT () { return t; }
    public int getZ () { return z; }

    public void putX () { this.x = x; }
    public void putY () { this.y = y; }
    public void putZ () { this.z = z; }
    public void putT () { this.t = t; }

    // Return the lower boundary of the neighborhood in x-direction
    // assuming the position of the center is zero
    public int getXLowerBoundary()
    {
        return -x/2;    
    }

    // Return the upper boundary of the neighborhood in x-direction
    // assuming the position of the center is zero
    public int getXUpperBoundary()
    {
        // Even number of units
        if (x%2 == 0)
            return x/2 - 1;
        else
            return x/2;    
    }

    // Return the lower boundary of the neighborhood in y-direction
    // assuming the position of the center is zero
    public int getYLowerBoundary()
    {
        return -y/2;    
    }

    // Return the upper boundary of the neighborhood in y-direction
    // assuming the position of the center is zero
    public int getYUpperBoundary()
    {
        // Even number of units
        if (y%2 == 0)
            return y/2 - 1;
        else
            return y/2;    
    }

    // Return the lower boundary of the neighborhood in z-direction
    // assuming the position of the center is zero
    public int getZLowerBoundary()
    {
        return -z/2;    
    }

    // Return the upper boundary of the neighborhood in z-direction
    // assuming the position of the center is zero
    public int getZUpperBoundary()
    {
        // Even number of units
        if (z%2 == 0)
            return z/2 - 1;
        else
            return z/2;    
    }

    // Return the lower boundary of the neighborhood in t-direction
    // assuming the position of the center is zero
    public int getTLowerBoundary()
    {
        return -t/2;    
    }

    // Return the upper boundary of the neighborhood in t-direction
    // assuming the position of the center is zero
    public int getTUpperBoundary()
    {
        // Even number of units
        if (t%2 == 0)
            return t/2 - 1;
        else
            return t/2;    
    }

}
